﻿Shader "PUEX/particle_trans_alpha" {
	Properties {
		_MainTex ("Texture", 2D) = "white" {}
	}
	SubShader {
		Tags { "Queue"="Transparent" "IgnoreProjector"="True" "RenderType"="Transparent" "DisableBatching"="True"}
		LOD 100
		Blend SrcAlpha OneMinusSrcAlpha
		Cull Off
		ZWrite Off
		
		Pass {
			CGPROGRAM
			#pragma vertex vert
	 		#pragma fragment frag
			
			#include "UnityCG.cginc"

			sampler2D _MainTex;

			struct appdata_t {
				float4 vertex : POSITION;
				fixed4 color : COLOR;
				float2 texcoord0 : TEXCOORD0;
			};
	        
			struct v2f_t {
				float4 vertex : SV_POSITION;
				fixed4 color : COLOR;
				float2 texcoord0 : TEXCOORD0;
			};
	        
	        v2f_t vert(appdata_t v) {
	            v2f_t o;
	            o.vertex = mul(UNITY_MATRIX_MVP, v.vertex);
	            o.color = v.color;
	            o.texcoord0 = v.texcoord0;
	            return o;
	        }
	        
	        fixed4 frag(v2f_t i) : SV_Target {
	            return tex2D(_MainTex, i.texcoord0) * i.color;
	        }
			ENDCG
		}
	}
}
